<template>
	<qiun-data-charts
		:canvas-id="canvasId"
		:type="type"
		:opts="opts"
		:chartData="chartData"
		:style="style"
		:canvas2d="canvas2d"
		:reshow="reshow"
		:ontouch="ontouch"
		background="#104993"
	/>
</template>

<script setup>
import { computed } from 'vue';
import { randomString } from '../../utils/tool';

const props = defineProps({
	type: {
		type: String,
		default: () => 'line'
	},
	opts: {
		type: Object,
		default: () => ({})
	},
	chartData: {
		type: Object,
		default: () => ({})
	},
	style: {
		type: String,
		default: `width: 100%; height: 100%`
	},
	canvas2d: {
		type: Boolean,
		default: false
	},
	ontouch: {
		type: Boolean,
		default: true
	},
	reshow: {
		type: Boolean,
		defualt: false
	}
});

const canvasId = computed(() => randomString())
</script>

<style lang="scss"></style>
